{extend name="admin@public/content"}

{block name="content"}
<form onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post" class='form-horizontal padding-top-20'>

    <div class="form-group">
        <label class="col-sm-2 control-label">授权发起页域名</label>
        <div class='col-sm-8'>
            <input disabled="disabled" class="layui-input layui-bg-gray" value="{:request()->host()}">
            <p class="help-block">必须从本域名内网页跳转到登录授权页，才可完成登录授权。无需填写 http:// 等域名协议前缀。</p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">授权事件接收URL</label>
        <div class='col-sm-8'>
            <input disabled="disabled" class="layui-input layui-bg-gray" value="{:url('@wechat/api.push/ticket','',true,true)}">
            <p class="help-block">用于接收取消授权通知、授权成功通知、授权更新通知，也用于接收 ticket，ticket 是验证平台方的重要凭据。</p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">微信接口服务AppID</label>
        <div class='col-sm-8'>
            <input type="text" name="component_appid" required="required" pattern="^.{18}$" title="请输入18位微信接口服务AppID" placeholder="请输入18位微信接口服务AppID" value="{:sysconf('component_appid')}" class="layui-input">
            <p class="help-block">微信接口服务 AppID，需要在微信开放平台获取。</p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">微信接口服务AppSecret</label>
        <div class='col-sm-8'>
            <input type="text" name="component_appsecret" required="required" pattern="^.{32}$" title="请输入32位微信接口服务AppSecret" placeholder="请输入32位微信接口服务AppSecret" value="{:sysconf('component_appsecret')}" class="layui-input">
            <p class="help-block">微信接口服务 AppSecret，需要在微信开放平台获取。</p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">微信消息校验Token</label>
        <div class='col-sm-8'>
            <input type="text" name="component_token" required="required" title="请输入微信消息校验Token" placeholder="请输入微信消息校验Token" value="{:sysconf('component_token')}" class="layui-input">
            <p class="help-block">开发者在代替微信接收到消息时，用此 Token 来校验消息。</p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">微信消息加解密Key</label>
        <div class='col-sm-8'>
            <input type="text" name="component_encodingaeskey" required="required" pattern="^.{43}$" title="请输入43位微信消息加解密Key" placeholder="请输入43位微信消息加解密Key" value="{:sysconf('component_encodingaeskey')}" class="layui-input">
            <p class="help-block">在代替微信收发消息过程中使用。必须是长度为43位的字符串，只能是字母和数字。</p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">微信消息与事件接收URL</label>
        <div class='col-sm-8'>
            <input disabled="disabled" class="layui-input layui-bg-gray" value="{:url('@wechat/api.push/notify/\$APPID\$','',true,true)}">
            <p class="help-block">通过该 URL 接收微信消息和事件推送，该参数按规则填写，实际接收消息时 $APPID$ 将被替换为微信 AppId。</p>
        </div>
    </div>

    <div class="hr-line-dashed"></div>

    <div class="form-group">
        <label class="col-sm-2 control-label"> 客户端系统Soap接口URL</label>
        <div class='col-sm-8'>
            <input disabled="disabled" class="layui-input layui-bg-gray" value="{:url('@wechat/api.client/soap/PARAM','',true,true)}">
            <p class="help-block">客户端系统 Soap 接口 URL，PARAM 由调用参数组成（AppName-AppId-AppKey）。</p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label"> 客户端系统Yar接口URL</label>
        <div class='col-sm-8'>
            <input disabled="disabled" class="layui-input layui-bg-gray" value="{:url('@wechat/api.client/yar/PARAM','',true,true)}">
            <p class="help-block">客户端系统 Yar 接口 URL，PARAM 由调用参数组成（AppName-AppId-AppKey）。</p>
        </div>
    </div>

    <div class="hr-line-dashed"></div>

    <div class="col-sm-6 col-sm-offset-2">
        <div class="layui-form-item text-center">
            <button class="layui-btn" type="submit">保存配置</button>
        </div>
    </div>

</form>

{/block}